package com.rico.deploy.service.impl;

import com.rico.deploy.entity.CourseStudentRelation;
import com.rico.deploy.mapper.CourseStudentRelationMapper;
import com.rico.deploy.service.CourseStudentRelationService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author 夏智力
 * @FileName CourseStudentRelationServiceImpl
 * @date 2021/5/2 17:47
 * @Software: IntelliJ IDEA
 */
public class CourseStudentRelationServiceImpl implements CourseStudentRelationService {
    @Autowired
    private CourseStudentRelationMapper courseStudentRelationMapper;

    @Override
    public List<CourseStudentRelation> selectAll() {
        return courseStudentRelationMapper.selectAll();
    }

    @Override
    public CourseStudentRelation selectById(Integer id) {
        return courseStudentRelationMapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertCourseStudentRelation(CourseStudentRelation courseStudentRelation) {
        return courseStudentRelationMapper.insert(courseStudentRelation);
    }

    @Override
    public int deleteCourseStudentRelationById(Integer id) {
        return courseStudentRelationMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int updateCourseStudentRelation(CourseStudentRelation courseStudentRelation) {
        return courseStudentRelationMapper.updateByPrimaryKey(courseStudentRelation);
    }
}
